package com.heima.common.exception;

import com.heima.model.common.enums.AppHttpCodeEnum;

public class CustomException extends RuntimeException {

    private AppHttpCodeEnum appHttpCodeEnum;

    //定义了一个公共的构造方法，用于初始化 CustomException 对象
    public CustomException(AppHttpCodeEnum appHttpCodeEnum){
        this.appHttpCodeEnum = appHttpCodeEnum;
    }

    //定义了一个公共的 getter 方法，用于获取 appHttpCodeEnum 的值
    public AppHttpCodeEnum getAppHttpCodeEnum() {
        //方法返回私有成员变量 appHttpCodeEnum 的值，使得外部代码可以访问该枚举值
        return appHttpCodeEnum;
    }
}
